An IC card (smart card) utilized in an electronic money system and a security system is developed.
A CPU for performing various kinds of processings, a memory for storing data required in these processings, etc. are built-in such an IC card and data are transmitted and received in a state in which the card comes in contact with a predetermined reader/writer (R/W).
There is also an IC card of a batteryless type itself having no battery among the IC cards. An electric power is supplied from the reader/writer (R/W) to such an IC card of the batteryless type.
However, such an IC card is used as a premise in a state in which the IC card comes in contact with the reader/writer (R/W). Accordingly, when the IC card is used in a noncontact fashion, a problem exists in that it is difficult for the IC card to obtain an electric power.
It may be also considered that a non-contact type IC card transits and receives data by utilizing an electromagnetic wave in a noncontact fashion between the IC card and the reader/writer (R/W) and an electric power required for the IC card is supplied by this electromagnetic wave. In such a method, the IC card can not obtain a sufficient electric power when a receiving state of the electromagnetic wave becomes bad while the card gets access to its built-in memory. Therefore, a problem exists in that there is a possibility of causing a defect in matching of data in the memory (memory corruption is caused).
Further, an area proportional to the size of an area for storing data is required to manage the data when information is held every storing unit of the data (every sector in the case of an MS-DOS(Microsoft-Disc Operating System)) as in a FAT (File Allocation Table) of the MS-DOS. Accordingly, there is a problem of a reduction in utilization efficiency of the memory. Further, when the memory area is managed in a predetermined storing unit of the data and data having a size smaller than this unit are stored, problems exist in that an unused memory area is caused and utilization efficiency of the memory is reduced further.
Further, since uniform processing is performed with respect to the reader/writer (R/W) in the above IC card, a problem exists in that it is difficult to perform individual processings corresponding to plural readers/writers.
The present invention is made in consideration of such situations. The present invention utilizes a memory section including a first area for storing data of plural users and a second area used by said plural users stored in said first area and managed in a physical block unit having a predetermined size. A logic block number is allocated to data stored in that physical block. The data are stored in a physical block except for the physical block storing the data having that logic block number. A number corresponding to a storing order is allocated to the data stored in the physical block. When the physical block having a final number is a final physical block, the data are stored in a leading physical block. In contrast to this, when the physical block having the final number is the final physical block, the data are stored in a physical block next to the physical block having the final number. Thus, the occurrence of memory corruption in a memory is logically restrained.
Further, in the present invention, numbers corresponding to the leading and final physical blocks of an area used by each of the users are held so that data can be managed by an information amount (the numbers corresponding to the leading and final physical blocks) proportional to the number of users instead of a size of the area used by each of the users.
Further, in the present invention, plural data for prescribing a predetermined area in the second area and respective different access rights are stored in the first area in the above memory section in accordance with one user. The data for prescribing the predetermined area in the second area are stored in the first area in accordance with plural users. Thus, individual processings can be performed in accordance with the plural users (R/W).